<template>
  <view class="building-index">
    <!-- 导航栏 -->
    <u-navbar title="楼栋服务" :placeholder="true" @leftClick="goBack">
    </u-navbar>

    <!-- 功能模块 -->
    <view class="function-modules">
      <view class="module-grid">
        <view class="module-item" @click="navigateToRun">
          <text class="module-title">楼栋跑腿</text>
          <text class="module-desc">快速配送服务</text>
        </view>
        
        <view class="module-item" @click="navigateToSupermarket">
          <text class="module-title">楼栋超市</text>
          <text class="module-desc">生活用品购买</text>
        </view>
        
        <view class="module-item" @click="navigateToMerchant">
          <text class="module-title">商家申请</text>
          <text class="module-desc">入驻楼栋服务</text>
        </view>
        
        <view class="module-item" @click="navigateToExpress">
          <text class="module-title">快递代取</text>
          <text class="module-desc">快递点代取包裹</text>
        </view>
        
        <view class="module-item" @click="navigateToDecoration">
          <text class="module-title">宿舍装潢</text>
          <text class="module-desc">宿舍装修服务</text>
        </view>
        
        <view class="module-item" @click="navigateToLaundry">
          <text class="module-title">干洗服务</text>
          <text class="module-desc">衣物干洗护理</text>
        </view>
        
        <view class="module-item" @click="navigateToComputer">
          <text class="module-title">电脑清灰</text>
          <text class="module-desc">电脑清洁维护</text>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
import { buildingAPI } from '@/src/api/building/index.js'

export default {
  name: 'BuildingIndex',
  data() {
    return {
      
    }
  },
  
  onLoad() {
    
  },
  
  methods: {
    goBack() {
      uni.navigateBack({
        delta: 1
      })
    },
    

    
    navigateToRun() {
      uni.navigateTo({
        url: '/building/run/index'
      })
    },
    
    navigateToSupermarket() {
      uni.navigateTo({
        url: '/building/supermarket/index'
      })
    },
    
    navigateToMerchant() {
      uni.showToast({
        title: '商家申请功能开发中',
        icon: 'none'
      })
    },
    
    navigateToExpress() {
      uni.navigateTo({
        url: '/building/delivery/index'
      })
    },
    
    navigateToDecoration() {
      uni.showToast({
        title: '宿舍装潢功能开发中',
        icon: 'none'
      })
    },
    
    navigateToLaundry() {
      uni.navigateTo({
        url: '/building/dryclean/index'
      })
    },
    
    navigateToComputer() {
      uni.navigateTo({
        url: '/building/computer/index'
      })
    },
    

  }
}
</script>

<style lang="scss" scoped>
.building-index {
  min-height: 100vh;
  background-color: #f5f5f5;
  padding-bottom: 20rpx;
}





.function-modules {
  background: white;
  margin: 20rpx;
  margin-top: 20rpx;
  border-radius: 16rpx;
  padding: 30rpx;
  
  .module-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 25rpx;
    
    .module-item {
      background: #f8f9fa;
      border-radius: 12rpx;
      padding: 30rpx 20rpx;
      text-align: center;
      transition: all 0.3s ease;
      
      &:active {
        transform: scale(0.95);
        background: #e9ecef;
      }
      
      .module-title {
        font-size: 28rpx;
        font-weight: bold;
        color: #333;
        display: block;
        margin-bottom: 10rpx;
      }
      
      .module-desc {
        font-size: 24rpx;
        color: #666;
      }
    }
  }
}


</style> 